﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GRTVPluginConsole.Entity
{
    public class DriverRank
    {
        public int slotId;
        public int place;
        public string name;
        public byte finishStatus;
        public bool isInPit;
        public string categoryGroup;
        public double trackDistance;
        public double lapDistance;
        public string team;
        public string number;
        public string carClass;
        public double lastLapTime;
        public double bestLapTime;
        public double s1;
        public double s2;
        public double s3;
        public double maxSpeed;
        public double lastMaxSpeed;
        public short lapsCompleted;
        public int numPitStops;
        public double timeBehindNextInFront;
        public double _curGap;
        public double x;
        public double y;
        public double z;
        public int catImageColor;
        public int catTextColor;
        
        public string getStatus()
        {
            if (finishStatus == 1)
            {
                return "FINISH";
            }
            else if (finishStatus == 2)
            {
                return "DNF";
            }
            else if (finishStatus == 3)
            {
                return "DQ";
            }
            else if (isInPit)
            {
                return "IN PIT";
            }
            else
            {
                return "";
            }
        }
    }
}
